package reverseString;

import java.util.Stack;
import java.util.StringTokenizer;

public class RevString 
{
	public static void main(String[] args) {
		String aInverser = "Bonjour tout le monde!";
		Stack<String> stack = new Stack<String>();
		
		/*Pour manipuler le string */
		StringTokenizer strTok = new StringTokenizer(aInverser);
		
		while (strTok.hasMoreElements()) 
		{
			stack.push((String) strTok.nextElement());
		}
		
		String strInv = "";
		
		while (!stack.isEmpty()) 
		{
			strInv+=stack.pop();
			strInv+=" ";
		}
		System.out.println("=========");
		System.out.println(aInverser + " ===> " + strInv) ;
		System.out.println("==========");
	}
}
